package world.ztomorrow.author.listen;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import world.ztomorrow.author.dto.AuthorInfoDto;
import world.ztomorrow.author.service.impl.AuthorServiceImpl;

@RestController
@RequiredArgsConstructor
public class NovelListen {

    private final AuthorServiceImpl authorService;

    @GetMapping("/get_author")
    AuthorInfoDto getAuthorById(@RequestParam("id") Long id){
        return authorService.getAuthor(id);
    }
}
